﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.IO;

using Hangjing.SQLServerDAL;
using Hangjing.Common;
using Hangjing.Model;

using org.in2bits.MyXls;
using Hangjing.AppLog;
using Hangjing.Weixin;

public partial class Admin_shop_wechatrefund : AdminPageBase
{
    Points daltogo = new Points();
    protected string otime
    {
        get
        {
            object o = ViewState["otime"];
            return (o == null) ? "" : o.ToString();
        }
        set
        {
            ViewState["otime"] = value;
        }
    }

    protected void Page_Load(object sender, EventArgs e)
    {
        ValidatorSet validator = new ValidatorSet("Admin");
        validator.SetValidator();
        CheckRights("A");
        if (!IsPostBack)
        {
            int id = HjNetHelper.GetQueryInt("id", 0);
            CustorderInfo model = new Custorder().GetModel(id);


            IList<WeChat_RefundLogInfo> refundlist = new WeChat_RefundLog().GetList(1, 1, "payorderid = '" + model.orderid + "'", "id", 1);
            if (refundlist.Count > 0)
            {

            }
            else
            {
                //查询退款

                WeChat_RefundLogInfo info = new WeChat_Refund(model.orderid, Context).queryRefund();
                if (info != null)
                {

                    refundlist.Add(info);

                    if (info.payorderid.Length > 0)
                    {
                        new WeChat_RefundLog().Add(info);
                    }
                }




            }

            WebUtility.BindRepeater(rptorder1, refundlist);

        }
    }


}

